package customer

type GetCustomerScoreResponse struct {
	RequestId string         `json:"requestId"`
	ErrCode   int            `json:"errCode"`
	ErrMsg    string         `json:"errMsg"`
	Data      []*ScoreDetail `json:"data"`
}

type ScoreDetail struct {
	AnnualIncreaseModuleScore             float32 `json:"annual_increase_module_score"`
	CompanyName                           string  `json:"company_name"`
	CreditModuleScore                     float32 `json:"credit_module_score"`
	Id                                    string  `json:"id"`
	IndustryCategoryBig                   string  `json:"industry_category_big"`
	IndustryScore                         int32   `json:"industry_score"`
	InvestModuleScore                     float32 `json:"invest_module_score"`
	LandUsageArr                          string  `json:"land_usage_arr"`
	NewhouseCnt2Year                      int32   `json:"newhouse_cnt_2_year"`
	NewhouseCntScore2Year                 int32   `json:"newhouse_cnt_score_2_year"`
	NewhousePrice2Year                    int64   `json:"newhouse_price_2_year"`
	NewhousePriceScore2Year               int32   `json:"newhouse_price_score_2_year"`
	BuildingSetsCnt                       int32   `json:"building_sets_cnt"`
	NewhouseYoy                           float32 `json:"newhouse_yoy"`
	NewhouseYoyScore                      int32   `json:"newhouse_yoy_score"`
	OrganizingCode                        string  `json:"organizing_code"`
	PrjTypeArr                            string  `json:"prj_type_arr"`
	ProjectCtn2Year                       int32   `json:"project_ctn_2_year"`
	ProjectCtnScore2Year                  int32   `json:"project_ctn_score_2_year"`
	ProjectInvest2Year                    int64   `json:"project_invest_2_year"`
	ProjectInvestScore2Year               int32   `json:"project_invest_score_2_year"`
	ProjectYoy                            float32 `json:"project_yoy"`
	ProjectYoyScore                       int32   `json:"project_yoy_score"`
	PulsarTime                            string  `json:"pulsar_time"`
	RecoveriesModuleScore                 float32 `json:"recoveries_module_score"`
	SamePeriodLastYearNewhouseCtn         int32   `json:"same_period_last_year_newhouse_ctn"`
	SamePeriodLastYearProjectCtn          int32   `json:"same_period_last_year_project_ctn"`
	SamePeriodLastYearTakeLandCtn         int32   `json:"same_period_last_year_take_land_ctn"`
	TakeLandCtn2Year                      int32   `json:"take_land_ctn_2_year"`
	TakeLandCtnScore2Year                 int32   `json:"take_land_ctn_score_2_year"`
	TakeLandPrice2Year                    int64   `json:"take_land_price_2_year"`
	TakeLandPriceScore2Year               int32   `json:"take_land_price_score_2_year"`
	TakeLandYoy                           float32 `json:"take_land_yoy"`
	TakeLandYoyScore                      int32   `json:"take_land_yoy_score"`
	ThisYearNewhouseCtn                   int32   `json:"this_year_newhouse_ctn"`
	ThisYearProjectCtn                    int32   `json:"this_year_project_ctn"`
	ThisYearTakeLandCtn                   int32   `json:"this_year_take_land_ctn"`
	TopCompanyIndustryCategoryBig         string  `json:"top_company_industry_category_big"`
	TopCompanyZxRecordCnt2Year            int32   `json:"top_company_zx_record_cnt_2_year"`
	ZxRecordCnt2Year                      int32   `json:"zx_record_cnt_2_year"`
	ZxRecordCntScore2Year                 int32   `json:"zx_record_cnt_score_2_year"`
	InvestModuleScoreUpperLimit           float32 `json:"invest_module_score_upper_limit"`
	RecoveriesModuleScoreUpperLimit       float32 `json:"recoveries_module_score_upper_limit"`
	CreditModuleScoreUpperLimit           float32 `json:"credit_module_score_upper_limit"`
	MatchRequirementModuleScoreUpperLimit float32 `json:"match_requirement_module_score_upper_limit"`
	AnnualIncreaseModuleScoreUpperLimit   float32 `json:"annual_increase_module_score_upper_limit"`
}

// MatchDemandScore 匹配需求得分和总分
type MatchDemandScore struct {
	OrganizingCode              string  `json:"organizing_code"`
	DeveloperScore              float32 `json:"developer_score"`
	MatchRequirementModuleScore float32 `json:"match_requirement_module_score"`
	MatchRequirementLandCtn     int32   `json:"match_requirement_land_ctn"`
	MatchRequirementProjectCtn  int32   `json:"match_requirement_project_ctn"`
}

type OpensearchGetCustomerResponse struct {
	Success   bool               `json:"success"`
	Message   interface{}        `json:"message"`
	ErrorCode interface{}        `json:"errorCode"`
	Data      []MatchDemandScore `json:"data"`
}

type BigDataCommencePermitListRequest struct {
	PageNum           int32  `json:"pageNum"`
	PageSize          int32  `json:"pageSize"`
	OrganizingCode    string `json:"organizing_code"`
	SubOrganizingCode string `json:"sub_organizing_code"`
	ProvinceCode      string `json:"province_code"`
	CityCode          string `json:"city_code"`
}

type BigDataCommencePermitListResponse struct {
	RequestId string `json:"requestId"`
	ErrCode   int    `json:"errCode"`
	ErrMsg    string `json:"errMsg"`
	Data      struct {
		TotalNum int32                       `json:"totalNum"`
		PageSize int                         `json:"pageSize"`
		PageNum  int                         `json:"pageNum"`
		Rows     []BigDataCommencePermitItem `json:"rows"`
	} `json:"data"`
	Sql interface{} `json:"sql"`
}

type BigDataCommencePermitItem struct {
	BeginDate         string `json:"begin_date"`
	City              string `json:"city"`
	CityCode          string `json:"city_code"`
	CompletedTime     string `json:"completed_time"`
	ConstructionUnit  string `json:"construction_unit"`
	ContractPrice     int    `json:"contract_price"`
	DeveloperName     string `json:"developer_name"`
	EndDate           string `json:"end_date"`
	Id                string `json:"id"`
	OrganizingCode    string `json:"organizing_code"`
	PrjNum            string `json:"prj_num"`
	ProjectName       string `json:"project_name"`
	Province          string `json:"province"`
	ProvinceCode      string `json:"province_code"`
	StartTime         string `json:"start_time"`
	SubDeveloperName  string `json:"sub_developer_name"`
	SubOrganizingCode string `json:"sub_organizing_code"`
	UpdateTime        string `json:"update_time"`
	PrjFunctionNum    string `json:"prj_function_num"`
	IsPriceGtAvg      string `json:"is_price_gt_avg"`
}

type BigDataSupplierProjectRequest struct {
	OrganizingCode string `json:"organizing_code"`
	Keyword        string `json:"keyword"`
	ProvinceCode   string `json:"province_code"`
	CityCode       string `json:"city_code"`
	CoopTimeMax    string `json:"coop_time_max"`
	CoopTimeMin    string `json:"coop_time_min"`
	PageNum        int32  `json:"pageNum"`
	PageSize       int32  `json:"pageSize"`
}
type BigDataSupplierProjectResponse struct {
	RequestId string `json:"requestId"`
	ErrCode   int    `json:"errCode"`
	ErrMsg    string `json:"errMsg"`
	Data      struct {
		TotalNum int32                        `json:"totalNum"`
		PageSize int                          `json:"pageSize"`
		PageNum  int                          `json:"pageNum"`
		Rows     []BigDataSupplierProjectItem `json:"rows"`
	} `json:"data"`
	Sql interface{} `json:"sql"`
}

type BigDataSupplierProjectItem struct {
	CoopAmount       float64 `json:"coop_amount"`
	CoopAmountOrgin  float64 `json:"coop_amount_orgin"`
	CoopCity         string  `json:"coop_city"`
	CoopCityCode     string  `json:"coop_city_code"`
	CoopCompanyCode  string  `json:"coop_company_code"`
	CoopCompanyName  string  `json:"coop_company_name"`
	CoopEndTime      string  `json:"coop_end_time"`
	CoopPrjName      string  `json:"coop_prj_name"`
	CoopProjectType  string  `json:"coop_project_type"`
	CoopProvince     string  `json:"coop_province"`
	CoopProvinceCode string  `json:"coop_province_code"`
	CoopStartTime    string  `json:"coop_start_time"`
	DataSource       string  `json:"data_source"`
	OrganizingCode   string  `json:"organizing_code"`
	SupplierId       string  `json:"supplier_id"`
	SupplierName     string  `json:"supplier_name"`
}
